package com.ibm.core.util;

public class SQLUtil
{
  public static String buildPageSql(String sql, int start, int limit)
  {
    return "select * from (select t.*,rownum r from (" + sql + ") t  where rownum<" + (start + limit) + ")  where r>=" + start;
  }

  public static String buildCount(String sql)
  {
    return "select count(1) from (" + sql + ") ";
  }

  public static String repSin2Dou(String str) {
    return str.replace("'", "''");
  }
}